package org.bayareadiplomacy.tournamatic
  
import org.bayareadiplomacy.tournamatic.model._

object Tournamator {
  def main(args : Array[String]) : Unit = {
    
    val currentTournament = new Tournament("DipCon SF",Variant.standard)
    
    val roundOne = currentTournament.createRound("Round One")
    
    roundOne.addPerson(new Person("Andy","Hull"))
    roundOne.addPerson(new Person("Adam","Silverman"))
    roundOne.addPerson(new Person("Condy", "Creek"))
    roundOne.addPerson(new Person("Edi","Birsan"))
    roundOne.addPerson(new Person("Conrad","Woodring"))
    roundOne.addPerson(new Person("Jim","O'Kelley"))
    roundOne.addPerson(new Person("Chris","Martin"))
    roundOne.addPerson(new Person("Dave", "Maletksy"))
    roundOne.addPerson(new Person("Nathan","Barnes"))
    roundOne.addPerson(new Person("Eric","Meade"))
   
    val boards = RandomAllocator.allocate(roundOne)
    
    boards.foreach(board => { 
    	println(board.name)
    	board.assignments.foreach(assignment => println("%s: %s %s".format(assignment._1.name, assignment._2.firstName, assignment._2.lastName)))
    })
  }
}
